package com.lanyam.travel.base.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * <p>
 * 
 * </p>
 *
 * @author rosson
 * @since 2020-01-27
 */
@TableName("panic_buy")
public class PanicBuy extends Model<PanicBuy> {

    private static final long serialVersionUID = 1L;

    @JsonProperty(value="id")
    private String id;
    /**
     * 旅游线路，景点，酒店id
     */
    @JsonProperty(value="goodsId")
    @TableField("goods_id")
    private String goodsId;
    /**
     * 抢购开始使劲
     */
    @JsonProperty(value="startDate")
    @TableField("start_date")
    private Date startDate;
    /**
     * 价格
     */
    @JsonProperty(value="price")
    private double price;
    /**
     * 请购结束时间
     */
    @JsonProperty(value="endDate")
    @TableField("end_date")
    private Date endDate;
    /**
     * 备注
     */
    @JsonProperty(value="content")
    private String content;
    /**
     * 剩余数量
     */
    @JsonProperty(value="totalNum")
    @TableField("total_num")
    private int totalNum;
    /**
     * 商品类型('0为景点，1为酒店，2为国外游，3为国内游')
     */
    @JsonProperty(value="goodType")
    @TableField("good_type")
    private int goodType;
    /**
     * 抢购状态（0为停止状态，1为开启状态）
     */
    @JsonProperty(value="status")
    private int status;
    /**
     * 抢到之后的有效时间
     */
    @JsonProperty(value="effectDays")
    private int effectDays;
    
    @JsonProperty(value="supplierId")
    @TableField("supplier_id")
    private String supplierId;
    
    @JsonProperty(value="product")
    @TableField(exist = false)
    private Product product;

    @JsonProperty(value="startTime")
    @TableField(exist = false)
    private String startTime;

    @JsonProperty(value="endTime")
    @TableField(exist = false)
    private String endTime;
   

    public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public int getEffectDays() {
		return effectDays;
	}

	public void setEffectDays(int effectDays) {
		this.effectDays = effectDays;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public void setTotalNum(int totalNum) {
		this.totalNum = totalNum;
	}

	public void setGoodType(int goodType) {
		this.goodType = goodType;
	}

	public String getId() {
        return id;
    }

    public PanicBuy setId(String id) {
        this.id = id;
        return this;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public PanicBuy setGoodsId(String goodsId) {
        this.goodsId = goodsId;
        return this;
    }

  


	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getContent() {
        return content;
    }

    public PanicBuy setContent(String content) {
        this.content = content;
        return this;
    }


    public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getTotalNum() {
		return totalNum;
	}

	public int getGoodType() {
		return goodType;
	}

	@Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "PanicBuy{" +
        ", id=" + id +
        ", goodsId=" + goodsId +
        ", createDate=" + startDate +
        ", price=" + price +
        ", endDate=" + endDate +
        ", content=" + content +
        ", totalNum=" + totalNum +
        ", goodType=" + goodType +
        ", status=" + status +
        "}";
    }
}
